var Counter = (function () {
  var privateCount = 0;
  function changeBy(val) {
    privateCount += val;
  }
  return {
    increment: function () {
      changeBy(1);
    },
    decrement: function () {
      changeBy(-1);
    },
    value: function () {
      return privateCount;
    },
  };
})();
console.log(Counter.value());
Counter.increment()
Counter.increment()
console.log(Counter.value());
Counter.decrement()
console.log(Counter.value());
console.log(Counter);
